Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
64ae6c3 to
75d4d8c
Compare
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: fac620d6f3aed9fab26e00aa34761263704506d0 |
| return 0, errors.New("api error") | ||
| }) | ||
|
|
||
| Expect(err).To(MatchError("[X-Request-Id:request-456]: [trace-id:trace-123]: api error")) |
There was a problem hiding this comment.
I would format the key in a similar fashion. Now we have the request ID with upper and lowercase + the X- upfront, while the trace-id is all lowercase and without the prefix.
We should keep one scheme
There was a problem hiding this comment.
I agree maybe we should switch the format to something like structured logging? I would prefer if we just could do a.logger.WithValues("Trace-ID", "128382189429")
But this will probably be an extra story.
How to categorize this PR?
/kind enhancement
/cc @stackitcloud/ske-infrastructure
What this PR does / why we need it:
This PR adds STACKIT trace IDs to API errors so they are available in controller and CSI logs during troubleshooting.
Ref: Log
failed to ensure load balancer: [trace-id:1e7c1f4a6b48af6cbe944153d3125c91]: 400 Bad Request, status code 400, Body